Skip to content

feat(scenarios): a recorded masking-off ask round (--schema-masking off), so the FLS question can be asked on the open cards - #36152

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-36073-masking-off-ask-round
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-36073-masking-off-ask-round

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #36073

Clause-②: yes (widening) — the new CLI flag --schema-masking on|off (cli.ts); through ./runner, the new module schema-masking.ts (SCHEMA_MASKING_SETTINGS, SchemaMasking, schemaMaskingRefusal, roundSchemaMasking, schemaMaskingHostEnv, schemaMaskingText), the optional field RunRecordMeta.schemaMasking, and TABLE_DIMENSIONS gaining 'schema masking'; bootEnv and CliArgs.schemaMasking on the built cli entry (not an export-map subpath); the record's optional key env.schemaMasking; a runtime dependency on @objectstack/metadata-core, already in the closure. Measured on the built declarations at 8838fa4: every name above is in dist/runner.d.ts's export list (re-exported from the shared summary chunk) or dist/cli.d.ts; none in index.d.ts, score.d.ts, score-full.d.ts or export.d.ts. Nothing removed or narrowed.
Metadata-protocol: none

维护者速读

  • 用户无感:场景评测的运行器新增一个开关,可在关闭对象结构遮蔽的应用上跑一轮问数,每条运行记录都写明遮蔽已关闭。
  • 属于问数评测史诗:让已裁定的字段级安全问题(字段对你不可见算通过,说空白算失败)能在公开卡片上真正被问到。
  • 只影响评测人员:默认每日一轮的记录逐字节不变;出错也只是评测读数错,不碰任何客户数据,可直接撤回。
  • 无

What changes

  • --schema-masking off boots every app of the run with OS_ALLOW_UNMASKED_OBJECT_METADATA=1 (ADR-0106 D8; the name is imported from @objectstack/metadata-core's OBJECT_SCHEMA_MASK_DISABLE_ENV), on the app's process only (bootEnv in cli.ts, schemaMaskingHostEnv). The run prints schema masking: off (...) and every record carries env.schemaMasking: "off" (RunRecordMeta.schemaMasking, runRecord). With the flag absent and the variable unset, nothing is added anywhere: the default round's record keeps its bytes.
  • Done-when 1, the inherited variable: recorded, not refused. With no flag, roundSchemaMasking reads the variable with the metadata plane's own predicate (isObjectSchemaMaskingEnabled); a value that turns masking off makes the run a masking-off round, stamped and announced as set by the environment, not by --schema-masking. A value the platform reads as masked (0, false, blank) stamps nothing. Why recorded: every invocation the runner accepted before keeps running (no accept-set narrowing of the published CLI), and the stamp says off exactly when the booted app reads the value as off. --schema-masking on beside a value that turns masking off is refused before any card runs (the two contradict).
  • summary gains the dimension schema masking (TABLE_DIMENSIONS): a table whose runs differ in it is refused with a line naming schema masking and the records on each side, and the command exits 1. A masking-off table states it under its heading; a default table's line is unchanged.
  • packages/qa/scenarios/README.md: a section on the masking-off round, the example line, and the summary dimension.

Tests

packages/qa/scenarios/test/runner/masking-off-ask-round.test.ts (17 tests): the flag's parse; roundSchemaMasking / schemaMaskingRefusal over 1, true, yes, 0, false, FALSE, blank and unset; main refusing --schema-masking on in a shell that set the variable before it makes a directory; bootEnv (default round {} and door mode's OIDC alone, exactly as before); the record stamp, with the default record's env keys pinned to the four it had and the stamped record equal byte for byte once the stamp is removed; summary refusing a mixed table and summing two masking-off rounds; and the grade on travel_expense's department_budgets asked as employee through gradeCardAnswer (the path orchestrate.ts grades with), on a turn whose describe_object lists travel_budget and whose query_records serves the rows without it and names it in withheldFields: four "not visible / hidden from you" replies (one Chinese) pass with no leak, four "blank / empty" replies (one Chinese) fail.

Readings at 8838fa4
  • pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 (after pnpm --filter @objectstack/scenarios build): Test Files 41 passed (41), Tests 1233 passed (1233), lock VERDICT command-exit 0.
  • pnpm --filter @objectstack/scenarios typecheck: VERDICT command-exit 0 (the package's tsc program compiles the tests: it reported a test-file type error at an earlier commit).
  • Ablations (each through scripts/ablation-replace.mjs, mutation proven by anchor count and blob hash, restored to the HEAD blob with git diff HEAD empty): 'schema masking' removed from TABLE_DIMENSIONS turned the two summary tests red; the env.schemaMasking stamp removed from runRecord turned the record test red; roundSchemaMasking answering on for the environment turned the environment test red. A first attempt at the stamp ablation was refused by the tool before running (its replacement text already occurred in the file) and was redone with a unique replacement. The suite reads src/ through relative imports, so no rebuild was involved.

Acceptance notes

  • Done-when 2 is shown on the grade path, not on a live round. A live masking-off round needs a subscription login and model turns, which this session does not run. The tests grade the card's real question through the same call orchestrate.ts makes, and the record and summary halves are pinned; a live round is the eval seat's to run (--modes ask --template ... --schema-masking off --only travel_expense,order_to_cash). NOT MEASURED: a live masking-off round.
  • The existing grader holds the ruled reading. Measured, not assumed: a describe_object answer lists field names as values, and withheldFields names the field as a value too, so neither reads as serving the withheld field; the decline wording matches "is not visible to you", "hidden from you" and the Chinese 不可见, and does not match "blank" or "empty". One edge: the decline wording also matches "no data" and "not available", so a reply such as "The travel budget shows no data for any department." or "The travel budget is blank (not available)." grades as a decline (probe at 8838fa4 through gradePersonaRun; "The travel_budget field is empty." and "Travel budget: N/A for all departments." fail as ruled). Reported to the seat; not changed here.
  • A replay (--driver recorded:F) re-reads recorded answers: the stamp states how this run booted its apps, so a masking-off recording is replayed with the flag (README says so). The recording itself does not carry the masking; not changed here.
  • File surface beyond the claim: packages/qa/scenarios/package.json and pnpm-lock.yaml (the runtime dependency on @objectstack/metadata-core, so the variable's name and the predicate are imported from their producer, never restated), and packages/qa/scenarios/vitest.config.ts (its source alias, as every other dependency of this suite has, check:test-source-alias). packages/metadata-core is not edited.
  • Overlap: node scripts/pm/overlap-check.mjs at 8838fa4 — VERDICT clean exit 0: merges cleanly with origin/main and with feat(scenarios): dataset-card questions name their ask kind, and a round counts every kind #36065 (README.md, scorecard.ts, summary.ts), fix(scenarios): the cited axis accepts the source a query_dataset answer tells the client to cite #36092 (README.md), chore: version packages #35129 (package.json), fix(settings)!: offer the knowledge settings only where the knowledge service is mounted #34223 (pnpm-lock.yaml).

Verification

Read first, by risk: packages/qa/scenarios/src/runner/schema-masking.ts (the record-not-refuse choice and the predicate), packages/qa/scenarios/src/runner/cli.ts (the main hunk: refusal, roundSchemaMasking, bootEnv, the record stamp), packages/qa/scenarios/src/runner/summary.ts (the new dimension and its hidden default).

Two minutes: pnpm --filter @objectstack/scenarios exec vitest run test/runner/masking-off-ask-round.test.ts — expect Tests 17 passed (17).

Gates at 8838fa4
  • node scripts/pm/dispatch-gates.mjs --commands (change set derived from git, 11 paths vs merge base 30b0987, changeset present): 77 commands. 75 exit 0. Two exit 3, NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test (PREREQUISITE NOT MET: its positive-control commit is outside this shallow clone; checker-health only) and pnpm check:dual-build-cjs-loads (its self-test passed; the scan reads every package's dist/ and this worktree built only the scenarios closure). CI runs both.
  • node scripts/pm/dispatch-gates.mjs --ran FILE: 77 derived famil(ies) accounted for — 77 run.
  • Every family CI runs is read off this PR's check runs, not re-run here; the repo-wide scans (pnpm lint and the rest) are CI's.

Generated by Claude Code

@github-actions github-actions Bot added size/m dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

18 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 4 changed file(s) yielded no anchor (packages/qa/scenarios/README.md, packages/qa/scenarios/package.json, packages/qa/scenarios/src/runner/index.ts, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 4 changed file(s) yielded no anchor (packages/qa/scenarios/README.md, packages/qa/scenarios/package.json, packages/qa/scenarios/src/runner/index.ts, …) — pages documenting those are invisible to this run
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 2b540f48160bacc7834143699b7a84097d7a3261 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from f4a7b5b6dbcb25d601ead62fa6b60b48e9c6fbed — the merge of head 8838fa4e199e65394bb9a2bf92b756b70d7a9cc2 into base 2b540f48160bacc7834143699b7a84097d7a3261, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin f4a7b5b6dbcb25d601ead62fa6b60b48e9c6fbed && git checkout f4a7b5b6dbcb25d601ead62fa6b60b48e9c6fbed
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2b540f48160bacc7834143699b7a84097d7a3261 8838fa4e199e65394bb9a2bf92b756b70d7a9cc2 && git checkout -B drift-repro 2b540f48160bacc7834143699b7a84097d7a3261 && git merge --no-ff 8838fa4e199e65394bb9a2bf92b756b70d7a9cc2

node scripts/docs-audit/affected-docs.mjs --json 2b540f48160bacc7834143699b7a84097d7a3261

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · sunhaolin · session_017xRBcSPM86QhYAcidhG5Bu

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 8838fa4e199e65394bb9a2bf92b756b70d7a9cc2
Local-runs: none
Scope: packages/qa/scenarios/src/runner/schema-masking.ts, packages/qa/scenarios/src/runner/cli.ts, packages/qa/scenarios/src/runner/scorecard.ts, packages/qa/scenarios/src/runner/summary.ts, packages/qa/scenarios/src/runner/index.ts + packages/metadata-core/src/object-schema-fls.ts
Security-touching: no

Owed on the Clause-②: yes (widening) declaration alone (no packages/spec/src/**, no governed path): the lane seat's in-seat review at TIER_DEFAULT.

① Derived judgments

  • Public surface widened, as declared. Right. Through ./runner (index.ts re-exports schema-masking.ts): SCHEMA_MASKING_SETTINGS, SchemaMasking, schemaMaskingRefusal, roundSchemaMasking, schemaMaskingHostEnv, schemaMaskingText; RunRecordMeta.schemaMasking?: 'off'; TABLE_DIMENSIONS gains 'schema masking'. On the cli entry: bootEnv, CliArgs.schemaMasking. The record's optional env.schemaMasking. The dev measured them on the built declarations (PR body): runner.d.ts / cli.d.ts only.
  • Accept set of the CLI widened, nothing narrowed. Right. --schema-masking on|off is new; an unknown value is refused by name. Every invocation accepted before is accepted now: with no flag, an exported OS_ALLOW_UNMASKED_OBJECT_METADATA is recorded (stamp + banner), not refused — Done-when 1 allows "refuses, or records". The one new refusal, --schema-masking on beside an environment that turns masking off, applies only to the new flag.
  • The stamp reads the variable as the host does. Right. roundSchemaMasking uses metadata-core's own isObjectSchemaMaskingEnabled and OBJECT_SCHEMA_MASK_DISABLE_ENV (object-schema-fls.ts:174), so the record says off exactly when the booted app is unmasked.
  • Default round byte-identical. Right. A masked run stamps nothing (schemaMasking only when 'off'); summary hides the dimension at its masked value; the dev pins byte-identity.

② Semver level

.changeset/36073-masking-off-ask-round.md: @objectstack/scenarios patch; the Metadata-protocol: kind is none, and none takes patch (AGENTS.md Post-Task Checklist step 3) — matches. Clause-②: yes (widening) and Metadata-protocol: none line-initial in body and changeset; none holds (nothing a metadata author writes changes). New dependency @objectstack/metadata-core is first-party and already in the closure.

③ Boundary flags

open_questions empty. Deviations answered: package.json + pnpm-lock.yaml + vitest.config.ts beyond the claim (the import from the producer and its source alias) — accepted. Out-of-scope finding class a filed as #36153 (the withheld grade's DECLINE accepts "no data" / "not available"). The replay note (a replay stamps its own boot) is documented in the README: noted, not filed. No SQL face.

Implemented-by: claude/issue-36073-masking-off-ask-round
Reviewed-by: session_017xRBcSPM86QhYAcidhG5Bu

No must-fix, no should-fix.

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · sunhaolin · session_017xRBcSPM86QhYAcidhG5Bu

席位核对 — ACCEPT · repo:objectstack#6 · head 8838fa4e199e65394bb9a2bf92b756b70d7a9cc2

L1 by the seat, read against GitHub at 2026-11-21T17:03Z.

  • Shape: Fixes #36073, Clause-②: yes (widening) and Metadata-protocol: none line-initial in body and changeset; 11 files, +430 / −10; @objectstack/scenarios patch.
  • Done-when, read in the diff: (1) the inherited OS_ALLOW_UNMASKED_OBJECT_METADATA is RECORDED (stamp + banner) when no flag is given, read with metadata-core's own isObjectSchemaMaskingEnabled; --schema-masking on beside it is refused; (2) --schema-masking off boots apps unmasked, stamps env.schemaMasking: "off", and summary refuses to mix the two configurations by the new schema masking table dimension; the live masking-off round is NOT MEASURED here (needs a subscription login), the grade path is pinned; (3) the default round stamps nothing and hides the dimension at its masked value — pinned byte-identical.
  • Gates: 67 check-runs on this head, 58 success, 9 skipped, 0 failed. check-governed-merges.mjs --pr 36152: NOT governed. landing-k.mjs: K = 5 < 15.
  • Contract review: the Clause-②: yes declaration's TIER_DEFAULT record by this seat on this head: PASS, no must/should-fix.
  • Accepted deviations: package.json + pnpm-lock.yaml (first-party @objectstack/metadata-core, already in the closure) and vitest.config.ts (its source alias) beyond the claim.
  • Out of scope: class a filed as Scenario grader: a withheld-field answer worded "no data" or "not available" grades as an honest decline, which the field-level-security ruling fails #36153 (the withheld grade's DECLINE accepts "no data" / "not available", against the FLS ruling); the replay-stamp note is documented in the README, not filed.
  • Landing: non-governed: ready + auto-merge by this seat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scenarios: a recorded masking-off ask round, so the ruled field-level-security question can be asked on the open cards

2 participants